import { message } from '@zh/common-utils/http'

/**
 * 全部消息
 * 1、全部查询
 * 2、分类查询
 * 3、条件检索
 * @param {Object} params
 */
export function queryMessageInsidePage (params) {
  return message.post('/message/MessageSendInside/queryMessageInsidePage', params)
}

/**
 * 查询分页列表
 * @param {Object} params
 */
export function getMessagePage (params) {
  return message.post('/message/MessageSendInside/queryPageToMoli', params)
}

/**
 * 消息-应用分类
 * @param {Object} params
 */
export function getMessageSourceApp (params) {
  return message.post('/message/MessageSendInside/getMessageSourceApp/1', params)
}

// 应用列表对应的未读数量
export function getAppMsgCount () {
  return message.post('/message/MessageSendInside/getMessageCountByCategoryForCache/1')
}

/**
 * 消息-全部已读
 * @param {Object} params
 */
export function editReadStatus (params) {
  return message.post('/message/MessageSendInside/editReadStatus', params)
}

/**
 * 消息-单个修改消息状态为已读
 * @param {Object} params
 */
export function editReadStatusOne (params) {
  return message.get('/message/MessageSendInside/updateReadStatusOne/' + params)
}